package com.gs.zsmanage.service.impl;

import com.gs.zsmanage.dao.CustomWarningMapper;
import com.gs.zsmanage.entity.CustomWarning;
import com.gs.zsmanage.service.CustomWarningService;
import com.gs.zsmanage.vo.IdAndName;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CustomWarningServiceImpl implements CustomWarningService {

    @Autowired
    CustomWarningMapper customWarningMapper;

    @Override
    public List<CustomWarning> getCustomWarningByDepartment(String department) {
        return customWarningMapper.listCustomWarningByDepartment(department);
    }

    @Override
    public void addCustomWarning(String department, Integer warningId) {
        customWarningMapper.addCustomWarning(department, warningId);
    }

    @Override
    public void deleteCustomWarning(String department, Integer warningId) {
        customWarningMapper.deleteCustomWarning(department, warningId);
    }

    @Override
    public List<IdAndName> getAllWarning() {
        return customWarningMapper.listAllWarning();
    }

}
